<template>
  <a-modal
    title="位置信息"
    :visible="visible"
    :maskClosable="false"
    :width="1000"
    @cancel="close"
    :footer="null">
    <Map ref="mapDrawId" style="height: 550px; background-color: #f7f7f7;" />
  </a-modal>
</template>

<script>
import Map from '@/views/xlgc/modules/map'
export default {
  components: { Map },
  data() {
    return {
      visible: false
    }
  },
  methods: {
    show(record) {
      this.visible = true
      let arr = [
        [
          {
            key: 0,
            longitude: record.longitude,
            latitude: record.latitude
          }
        ]
      ]
      this.$nextTick(() => {
        this.$refs.mapDrawId.clearAll()
        this.$refs.mapDrawId.setMapData(arr)
      })
    },
    close() {
      this.visible = false
    }
  }
}
</script>
<style lang="less" scoped></style>
